package com.lww.feature.test.finaltest;

import org.junit.Test;

/**
 * User: yian
 * Date: 2017/10/17
 */
public class test {

    public final A a = new A();
    public int b;
    public A getA() {
        return a;
    }

    //final域能其属性，但不能改版变量对应的指针指向的地方。
    @Test
    public void testA() {
        test test = new test();
        test.b = 1;
//        ReferenceTypeTest.a = new A();//编译就会报错
        test.getA().setI(3);
        test.getA().setS("s");
        System.out.println(test.getA().getI());
        System.out.println(test.getA().getS());

    }
}
